//
//  MRCountry_DiscountTableViewCell.m
//  Travel_World
//
//  Created by dllo on 15/10/15.
//  Copyright © 2015年 TLS. All rights reserved.
//

#import "MRCountry_DiscountTableViewCell.h"

@implementation MRCountry_DiscountTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self createCell];
        
    }
    return self;
}

- (void)createCell
{
    
    self.ImageView = [[UIImageView alloc] init];
    [self.contentView addSubview:self.ImageView];
    
    self.title = [[UILabel alloc] init];
    self.title.textColor = [UIColor grayColor];
    self.title.numberOfLines = 2;
    self.title.font = [UIFont systemFontOfSize:15];
    [self.contentView addSubview:self.title];
    
    self.discount = [[UILabel alloc] init];
    self.discount.textColor = [UIColor lightGrayColor];
    self.discount.font = [UIFont systemFontOfSize:13];
    [self.contentView addSubview:self.discount];
    
    self.price = [[UILabel alloc] init];
    self.price.textColor = [UIColor redColor];
    self.price.font = [UIFont systemFontOfSize:15];
    self.price.textAlignment = NSTextAlignmentRight;
    [self.contentView addSubview:self.price];
    
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.ImageView.frame = CGRectMake(20 * WID, 10 * HEI, 110 * WID, 70 * HEI);
    
    self.title.frame = CGRectMake(140 * WID, 10 * HEI, 220 * WID, 50 * HEI);
    
    self.discount.frame = CGRectMake(140 * WID, 60 * HEI, 60 * WID, 20 * HEI);
    
    self.price.frame = CGRectMake(250 * WID , 65 * HEI, 100 * WID, 20 * HEI);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
